<template>
  <div>
    <div class="search" v-for="item in keyWordsData">
      <div class="searchTitle">
        <h2>关于“<span class="keywords">{{item.keyword}}</span>”,共找到<span class="count">{{item.count}}</span>项相关问题</h2>
      </div>
      <div class="searchContent">
        <div class="result" v-for="val in item.listData">
          <h3 class="reTirle">
            {{val.question}}
        </h3>
          <div class="reContent">
            <div class="content">
              <p>
                {{val.answer}}
            </p>
            </div>
            <p class="from">
              {{val.from}}
          </p>
          </div>
        </div>
      </div>
      <Pages></Pages>
    </div>
  </div>
</template>
<script>
  import Pages from '.././components/pages.vue'
  export default {
    name: 'search',
    components:{
        Pages
    },
    data () {
      return {
          keyWordsData:[
            {
                keyword:"订单",
                count:"256",
                listData:[
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单您好，预售商品下下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  },
                  {
                    question:"预售订单可以修改订单么？",
                    answer:"您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单您好，预售商品下单成功之后无法修改订单",
                    from:" 来自：工艺展示"
                  }
                ]
            }
          ]
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.search{
  background: #fff;
  border-radius: 20px;
  margin-left: 20px;
  padding: 10px 20px 0 20px;
  text-align: left;
}
.search .searchTitle>h2{
  height: 50px;
  line-height: 50px;
  color: #464c5b;
  font-weight: normal;
  font-size: 16px;
  text-align: left;
}
.search .keywords,.search .count{
  color:#f27979;
}
.search .reTirle{
  height: 34px;
  line-height: 34px;
  color: #9ea7b4;
  font-size: 14px;
}
.search .reContent>.content p{
  line-height: 24px;
  font-size: 12px;
  color: #9ea7b4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.search .reContent>.from{
  color:#464c5b;
  line-height:24px;
  margin-top: 4px;
}
.search .searchContent .result{
    margin-bottom: 24px;
  }
  .searchContent{
    border-bottom: 1px solid #e3e8ee;
  }
</style>
